package com.tanhua.server.controller;

import com.tanhua.server.interceptor.UserHolder;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

@RestController
@RequestMapping("/huanxin")
public class HuanXinController {
    /*
    * 环信--加载环信用户的信息（账号和密码）
    * Get/huanxin/user*/

    @GetMapping("/user")
    public ResponseEntity getHuanxinUser(){
        HashMap<String, Object> result = new HashMap<>();
        result.put("username", UserHolder.getUserId().toString());
        result.put("password","123456");
        return  ResponseEntity.ok(result);


    }
}
